package cn.pupil.springframework.aop;

import java.lang.reflect.Method;

/**
 * @Description: 方法前置通知接口
 * @Author: pupil
 * @Date: 2024/11/21 下午 4:18
 */
public interface MethodBeforeAdvice extends BeforeAdvice{

    /**
     * Callback before a given method is invoked.
     * 在调用给定方法之前进行回调。
     * @param method method being invoked 将被调用的方法
     * @param args   arguments to the method  方法的参数
     * @param target target of the method invocation. May be <code>null</code>.  方法调用的目标。可能是<code>空</code>。
     * @throws Throwable if this object wishes to abort the call.
     *                   Any exception thrown will be returned to the caller if it's
     *                   allowed by the method signature. Otherwise the exception
     *                   will be wrapped as a runtime exception.
     */
    void before(Method method,Object[] args,Object target) throws Throwable;
}
